﻿using RXY_Mall.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RXY_Mall.Application.Goods.Dto
{
    public class GoodsList
    {
        public int id { get; set; }
        public string shopName { get; set; }
        public string categoryName { get; set; }
        public string name { get; set; }
        public DateTime add_time { get; set; }
        public decimal settlement_price { get; set; }
        public decimal market_price { get; set; }
        public decimal sale_price { get; set; }
        public decimal service_rate { get; set; }
        public int sale_count { get; set; }
        public int comment_count { get; set; }
        public byte published { get; set; }
        public bool is_sale { get; set; }
        public bool is_new { get; set; }
        public bool is_top { get; set; }
        public int sort { get; set; }
        public string default_img { get; set; }
    }

    public class GoodsDto
    {
        public int id { get; set; }
        public string shopName { get; set; }
        public string categoryName { get; set; }
        public string name { get; set; }
        public DateTime add_time { get; set; }
        public decimal settlement_price { get; set; }
        public decimal sale_price { get; set; }
        public decimal service_rate { get; set; }
        public int sale_count { get; set; }
        public int comment_count { get; set; }
        public byte published { get; set; }
        public bool is_sale { get; set; }
        public bool is_new { get; set; }
        public bool is_top { get; set; }
        public int sort { get; set; }

        public int all_stock_count { get; set; }
        public int stock_count { get; set; }
        public int sku_count { get; set; }
        public string default_img { get; set; }
    }

    public class GoodsInput
    {
        public int id { get; set; }
        public int shop_id { get; set; }
        public string shopName { get; set; }
        public int category_id { get; set; }
        public int type_id { get; set; }
        public string name { get; set; }
        public string short_title { get; set; }
        public string summary { get; set; }
        public string description { get; set; }
        public int limit_quantity { get; set; }
        public int notify_admin_quantity { get; set; }
        public int category_id1 { get; set; }
        public int category_id2 { get; set; }
        public int category_id3 { get; set; }
        public string brand { get; set; }
        public string remark { get; set; }

        public decimal weight { get; set; }
        public int freight_template_id { get; set; }

        public decimal market_price { get; set; }
        public decimal settlement_price { get; set; }
        public decimal sale_price { get; set; }
        public decimal service_rate { get; set; }
        public bool is_new { get; set; }
        public bool is_top { get; set; }
        public int sort { get; set; }

        public int require_num { get; set; }
        public int duration { get; set; }
        public DateTime start_time { get; set; }
        public DateTime? end_time { get; set; }

        //public decimal group_price { get; set; }
        public decimal red_packet { get; set; }

        public string goods_service { get; set; }
        public List<string> banner_img_List { get; set; }
        public List<string> info_img_List { get; set; }
    }

    public class GoodsPictureDto
    {
        public int id { get; set; }
        public int sort { get; set; }
        public string url { get; set; }
    }
    public class GoodsPictureInput
    {
        public int good_id { get; set; }
        public int type_id { get; set; }
        public List<string> banner_img_List { get; set; }
        public List<string> info_img_List { get; set; }
        public List<string> current_imglist { get; set; }
        //public List<int> info_img_delList { get; set; }
    }

    public class GoodsServiceDto
    {
        public int id { get; set; }
        public string title { get; set; }
    }

    public class GoodsSpecDto
    {
        public int id { get; set; }
        public int goods_id { get; set; }
        //public int goods_type { get; set; }
        public string name { get; set; }
        public string description { get; set; }
    }

    public class GoodsSpecValueDto
    {
        public int id { get; set; }
        public int goods_id { get; set; }
        public string goodsname { get; set; }
        public string name { get; set; }
        public int sort { get; set; }
        public string thumb_url { get; set; }
        public bool is_selected { get; set; }
        public int sku_count { get; set; }
        public List<GoodsSkuDto> sku { get; set; }
    }
    public class GoodsSpecValueInput
    {
        public int id { get; set; }
        public int spec_id { get; set; }
        public int goods_id { get; set; }
        public string name { get; set; }
        public int sort { get; set; }
        public string thumb_url { get; set; }
        public bool is_selected { get; set; }
    }

    public class GoodsSkuDto
    {
        public int id { get; set; }
        //public int goods_type { get; set; }
        public decimal market_price { get; set; }
        public decimal sale_price { get; set; }
        public decimal settlement_price { get; set; }
        public decimal service_rate { get; set; }
        public int all_stock { get; set; }
        public int stock_quantity { get; set; }
        public bool published { get; set; }
        public bool is_sale { get; set; }
        public string specs { get; set; }
        public string goodsname { get; set; }
        public string thumb_url { get; set; }
    }
    public class GoodsSkuInput
    {
        public int id { get; set; }
        public decimal market_price { get; set; }
        public decimal sale_price { get; set; }
        //public decimal service_rate { get; set; }
        public decimal settlement_price { get; set; }
        public int stock_quantity { get; set; }
        public string thumb_url { get; set; }
    }

    public class CategoryDto
    {
        public int id { get; set; }
        public int parent_id { get; set; }
        public string parent_name { get; set; }
        public byte type { get; set; }
        public string name { get; set; }
        public string icon { get; set; }
        public int sort { get; set; }
        public byte layer { get; set; }
        public byte status { get; set; }
        public decimal? service_rate { get; set; }
    }

    public class CategoryInput
    {
        public int id { get; set; }
        public int? parent_id { get; set; }
        public byte type { get; set; }
        public string name { get; set; }
        public string icon { get; set; }
        public int sort { get; set; }
        public bool status { get; set; }
        public decimal? service_rate { get; set; }
        public string remark { get; set; }
    }

    public class SpecSkuDto
    {
        public List<GoodsSpecDto> goods_spec { get; set; }
        public List<GoodsSpecValueDto> goods_specvalue { get; set; }
        public List<GoodsSkuDto> goods_sku { get; set; }
    }

    public class SpecWithValueDto
    {
        public SpecTypeDto img_spec { get; set; }
        public SpecTypeDto text_spec { get; set; }
    }
    public class SpecTypeDto
    {
        public int id { get; set; }
        public string name { get; set; }
        public List<SingleSpecValueDto> value_list { get; set; }
    }
    public class SingleSpecValueDto
    {
        public int id { get; set; }
        public string name { get; set; }
        public string thumb_url { get; set; }
    }

    public class CategoryTreeDto
    {
        /// <summary>
        /// 节点id
        /// </summary>
        public string id;
        /// <summary>
        /// 父节点pId I必须大写
        /// </summary>
        public string pId;
        /// <summary>
        /// 节点名称
        /// </summary>
        public string name;
        /// <summary>
        /// 是否展开树节点，默认不展开
        /// </summary>
        public string open = "true";
    }

    #region 品牌
    public class GetBrandsOutput
    {
        /// <summary>
        /// 品牌编号
        /// </summary>
        public int brand_id { get; set; }
        /// <summary>
        /// 品牌名称
        /// </summary>
        public string brand_name { get; set; }
        /// <summary>
        /// Logo
        /// </summary>
        public string logo { get; set; }
        /// <summary>
        /// 所属公司
        /// </summary>
        public string company_name { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }
        /// <summary>
        /// 是否置顶
        /// </summary>
        public bool is_top { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public byte? status { get; set; }
        public DateTime? add_time { get; internal set; }
    }

    #endregion

}
